using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SmartLink.Domain.Entity;
using SmartLink.Domain.ExpandEntity.Base;
using SmartLink.Domain.ExpandEntity;

namespace SmartLink.IRepository
{
    public interface IPER_RoleGroupRepo : IRepository<PER_RoleGroup>
    {
        /// <summary>
        /// 判断角色名在指定组织下是否已存在
        /// </summary>
        /// <param name="roleName"></param>
        /// <param name="oid"></param>
        /// <returns></returns>
        bool Exist(string roleName, int oid);
        /// <summary>
        /// 判断新角色名在指定组织下是否重复
        /// </summary>
        /// <param name="id"></param>
        /// <param name="newRoleName"></param>
        /// <param name="oid"></param>
        /// <returns></returns>
        bool Repeat(int id, string newRoleName, int oid);
        /// <summary>
        /// 获取角色分页列表
        /// </summary>
        /// <param name="enabled"></param>
        /// <param name="keyWord"></param>
        /// <param name="oid"></param>
        /// <param name="pagination"></param>
        /// <returns></returns>
        IEnumerable<PER_RoleGroupExpand> GetRolePaged(bool? enabled, string keyWord, int oid, Pagination pagination);
        /// <summary>
        /// 获取公司下角色数量
        /// </summary>
        /// <param name="oid"></param>
        /// <returns></returns>
        int GetRolesCount(int oid);
        IList<PER_RoleGroup> GetRoleListByOID(int OID);
        PER_RoleGroup GetCompanyManagerRole();
        bool DeleteRoleByOrgId(int orgId);
        IList<int> GetOrgMangerRoleIds();
        void AddDefaultRole(int oid);
    }
}
